Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discard multiple values returned by handle-request #194

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

bpanthi977
Copy link
Contributor

In default method for `handler-request'

(throw 'handler-done
   (values nil cond (get-backtrace)))

is used, which is caught in `process-request' and the second return
value is used as error flag. However if handler-request returns
multiple values normally from user code, this also registers as
error.

For example, a define-easy-handler such as

(define-easy-handler (...) ()
    ...
    (gethash key table))

seems OK as user code. But the `gethash' returns T as second value
which undesirably leads to error.

In default method for `handler-request'

```
(throw 'handler-done
   (values nil cond (get-backtrace)))
```

is used, which is caught in `process-request' and the second return
value is used as error flag. However if handler-request returns
multiple values normally from user code, this also registers as
error.

For example, a define-easy-handler such as

```
(define-easy-handler (...) ()
    ...
    (gethash key table))
```

seems OK as user code. But the `gethash' returns T as second value
which undesirably leads to error.
@stassats stassats merged commit 2bda004 into edicl:master Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants